<!--{eval $_TPL['titles'] = array('邀请朋友');}-->
<!--{template header_tpl}-->
<div class="grid_16 main_box">
		<!--{if 1}-->
			<div class="grid_16 box">
				<h1>邀请朋友</h1>
				<div class="grid_16">
				<form id="inviteform" action="{SITEURL}invite/index" method="post" accept-charset="utf-8" >
					<table class="formtable">
							<tr>
								<th width="15%">邀请邮箱</th>
								<td width="50%">
									<input type="text" name="email" value="" id="email" class="textinput"/>
								</td>
									<input type="hidden" name="formhash" value="<!--{eval echo formhash();}-->" />
								<td><input type="submit" name="invitesubmit" value="发送邀请" id="invitesubmit"></td>
							</tr>
							<tr><td colspan="3"><span id="errormsg">&nbsp;</span></td></tr>
					</table>
				</form>
				</div>
			</div>
		<!--{else}-->
			<div class="grid_16 box">
				<h1>错误</h1>
			</div>
		<!--{/if}-->
</div>

<div class="grid_7 omega sidebar">
	<!--{template userinfo_tpl}-->
</div>
<script src="<!--{eval echo base_url();}-->resources/js/jquery.validate.min.js" type="text/javascript"></script>
<script src="<!--{eval echo base_url();}-->resources/js/validate.messages_cn.js" type="text/javascript"></script>
<script src="<!--{eval echo base_url();}-->resources/js/validate.additional-methods.min.js" type="text/javascript"></script>
<script src="<!--{eval echo base_url();}-->resources/js/jquery.form.js" type="text/javascript"></script>
<script type="text/javascript">
$(document).ready(function() {
	var validator = $("#inviteform").validate({
		onfocusout:false,
		onkeyup:false,
		errorElement:"span",
		rules: {
			email: {
				required: true,
				rangelength:[1,100],
				email:true
			}
		},
		messages: {
			email: {
				required: "请输入邀请邮箱",
				rangelength: $.validator.format("邮箱 为{0} 到 {1} 字符"),
				email: "请输入正确的邮箱格式"
			}
		},
		errorPlacement: function(error, element) {
			error.appendTo($('#errormsg'));
		},
		highlight: function(element, errorClass) {
				$(element).fadeOut(function() {
				$(element).fadeIn();
			});
		},
		success: function(label) {
		}
	});
});
</script>
<!--{template footer_tpl}-->